//查看课程详情接口
var currid = getQueryString("currid");

//查看详情
function lessonDetail(){
    $.ajax({
        url: API_URL+'curriculum/findCurriculum?currid='+currid+'&openid'+openid,
        type: 'GET',
        dataType: "JSON",
        data:'',
        async: false,
        success: function (obj){
            if (obj.status.code == 0) {
                var myData = obj.data;
                console.log(myData[0].title);
                var Str = '';
                Str += '<div class="head_content">'+
                            '<img src=\"'+myData[0].agent_icon+'\" alt="">'+
                            '<h3>'+myData[0].agent_department+'</h3>'+
                            '<p>'+myData[0].createtime_str+'</p>'+
                        '</div>'+
                        '<p class="article clear">'+myData[0].title+'<a id="a_video" href=\"'+myData[0].url+'\"><i class="a_icon">网页链接</p>'+
                        '<video height="140" width="181" poster=\"'+myData[0].agent_icon+'\" controls="controls" preload="none" webkit-playsinline="webkit-playsinline">'+
                           '<source src=\"'+myData[0].url+'\" type="video/mp4" preload="auto">'+
                        '</video>'+
                        '<ul class="radiolabel_content">'+
                            '<li><span>'+myData[0].channelname+'</span></li>'+
                            '<li><span>'+myData[0].curriculumtypename+'</span></li>'+
                            '<li><span>'+myData[0].standardname+'</span></li>'+
                        '</ul>';
                    }
			/*<div class="head_content">
				<img src="../img/default.png" alt="">
				<h3>新华保险培训部</h3>
				<p>5分钟前</p>
			</div>
			<p class="article clear">理财+保障，小小投入，轻松理财！</p>
			<div class="pdf_content">
				<img class="pdf_img" src="../img/icon-pdf22.png" alt="">
				<h3>新华最新培训教程 第三版 中文版PDF.pdf</h3>
			</div> */
        $('.main_content.new').html(Str);
        },
        error: function (data){
            console.log("服务器异常!");
        }
    });
}
 